<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			var a = ["America", "Greece", "Britain", "Canada", "China", "Egypt"];

			var str = a.toString();
			var str2 = Array.from(str.toLocaleUpperCase());
			//alert(str2.join("?"));
			var n = 0;
			str2.forEach(x => {
				if (x == 'A') {
					n++
				}
			});
			alert(n)
		</script>
	</head>
	<body>
	</body>
</html>
